package demo7;

import java.lang.reflect.Constructor;

/**
 * @program: java-generic
 * @description:
 * @author: bjc
 * @create: 2021-08-15 16:32
 */
public class Main {
    public static void main(String[] args) throws Exception {
//        Class<Person> clazz = Person.class;
//        Constructor<Person> constructor = clazz.getConstructor();
//        Person person = constructor.newInstance();
        Class personClass = Person.class;
        Constructor constructor = personClass.getConstructor();
        Person instance = (Person) constructor.newInstance();
    }
}
